package com.champ.mc.service.t10;

public class PrintString implements Runnable {
    private boolean iscontinuePrint = true;
    public boolean isIscontinuePrint() {
        return this.iscontinuePrint;
    }
    public void setIscontinuePrint(boolean iscontinuePrint) {
        this.iscontinuePrint = iscontinuePrint;
    }
    public void printStringPrint() {
        while (iscontinuePrint==true) {
            System.out.println("run print string method threadName=" + Thread.currentThread().getName());
            try {
                Thread.sleep(1001);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    @Override
    public void run() {
        printStringPrint();
    }
}
